package com.liqin.nothing.controller;

import com.liqin.nothing.client.MailClient;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class MailController {

    private final MailClient mailClient;

    @GetMapping("/send-mail")
    public void sendMail(@RequestParam String to, @RequestParam String name, @RequestParam String city) {
        mailClient.sendEmail(to, name, city);
    }
}    